package com.example.getway9001;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.gateway.handler.RoutePredicateHandlerMapping;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class Getway9001Application {

    public static void main(String[] args) {
        SpringApplication.run(Getway9001Application.class, args);
    }

//    @Bean
//    public RouteLocator customRouteLoctor(RouteLocatorBuilder builder) {
////        return builder.routes().route("consul_route", r ->
////                r.path("/consul/**").uri("http://localhost:8889")
////        ).build();
//
//        return builder.routes().route("consul_route", r ->
//                r.path("/consul/**").uri("lb://consul8889")
//        ).build();
//
//    }

}
